# use same minimum cmake version as hms itself
cmake_minimum_required(VERSION 3.13.1 FATAL_ERROR)

enable_language(CXX)

# inclusion of the file below allows access to hms' cmake configuration files
find_package(hmspath REQUIRED)

# By including the files below, the same compiler settings are used
# as the ones used by hms.
# activating all warnings and treat them as errors
# This is optional, but HIGHLY recommended.
include_conf(warnings_as_errors)
# limit compiler output to 2 errors
# This makes it much easier to actually find the problem.
include_conf(max_2_errors)
# activate flag -march=native for release builds.
# May improve performance, but can sometimes also lead to problems.
include_conf(rel_arch-native)
# Catch missing function definitions at link time
include_conf(no-undefined)

# =============================
# Configure the build of your plugin below.

# project and binary name
project("slow")

add_library(${CMAKE_PROJECT_NAME} SHARED
	slow.hpp
	slow.cpp
)

target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC
	hms::plugin
)

target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
	${CMAKE_CURRENT_SOURCE_DIR}
)
